home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / zs20a.zip / VBX2FORM.FR_ / VBX2FORM.FRM
Text File  |  1994-11-21  |  10KB  |  288 lines

  1. VERSION 2.00
  2. Begin Form Form2 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Zip file informations..."
  6.    ClientHeight    =   2205
  7.    ClientLeft      =   2085
  8.    ClientTop       =   1920
  9.    ClientWidth     =   5430
  10.    Height          =   2610
  11.    Left            =   2025
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2205
  16.    ScaleWidth      =   5430
  17.    Top             =   1575
  18.    Width           =   5550
  19.    Begin CommandButton Command1 
  20.       Caption         =   "Close"
  21.       Default         =   -1  'True
  22.       Height          =   336
  23.       Left            =   4164
  24.       TabIndex        =   6
  25.       Top             =   1776
  26.       Width           =   1140
  27.    End
  28.    Begin Label FileMethod 
  29.       BackColor       =   &H00C0C0C0&
  30.       FontBold        =   0   'False
  31.       FontItalic      =   0   'False
  32.       FontName        =   "MS Sans Serif"
  33.       FontSize        =   8.25
  34.       FontStrikethru  =   0   'False
  35.       FontUnderline   =   0   'False
  36.       Height          =   240
  37.       Left            =   1848
  38.       TabIndex        =   7
  39.       Top             =   1404
  40.       Width           =   3372
  41.    End
  42.    Begin Label FileTime 
  43.       BackColor       =   &H00C0C0C0&
  44.       FontBold        =   0   'False
  45.       FontItalic      =   0   'False
  46.       FontName        =   "MS Sans Serif"
  47.       FontSize        =   8.25
  48.       FontStrikethru  =   0   'False
  49.       FontUnderline   =   0   'False
  50.       Height          =   240
  51.       Left            =   1848
  52.       TabIndex        =   8
  53.       Top             =   1140
  54.       Width           =   3360
  55.    End
  56.    Begin Label FileDate 
  57.       BackColor       =   &H00C0C0C0&
  58.       FontBold        =   0   'False
  59.       FontItalic      =   0   'False
  60.       FontName        =   "MS Sans Serif"
  61.       FontSize        =   8.25
  62.       FontStrikethru  =   0   'False
  63.       FontUnderline   =   0   'False
  64.       Height          =   240
  65.       Left            =   1848
  66.       TabIndex        =   12
  67.       Top             =   876
  68.       Width           =   3348
  69.    End
  70.    Begin Label FileCompSize 
  71.       BackColor       =   &H00C0C0C0&
  72.       FontBold        =   0   'False
  73.       FontItalic      =   0   'False
  74.       FontName        =   "MS Sans Serif"
  75.       FontSize        =   8.25
  76.       FontStrikethru  =   0   'False
  77.       FontUnderline   =   0   'False
  78.       Height          =   240
  79.       Left            =   1848
  80.       TabIndex        =   11
  81.       Top             =   624
  82.       Width           =   3336
  83.    End
  84.    Begin Label FileSize 
  85.       BackColor       =   &H00C0C0C0&
  86.       FontBold        =   0   'False
  87.       FontItalic      =   0   'False
  88.       FontName        =   "MS Sans Serif"
  89.       FontSize        =   8.25
  90.       FontStrikethru  =   0   'False
  91.       FontUnderline   =   0   'False
  92.       Height          =   240
  93.       Left            =   1848
  94.       TabIndex        =   10
  95.       Top             =   372
  96.       Width           =   3348
  97.    End
  98.    Begin Label FileName 
  99.       BackColor       =   &H00C0C0C0&
  100.       FontBold        =   0   'False
  101.       FontItalic      =   0   'False
  102.       FontName        =   "MS Sans Serif"
  103.       FontSize        =   8.25
  104.       FontStrikethru  =   0   'False
  105.       FontUnderline   =   0   'False
  106.       Height          =   240
  107.       Left            =   1848
  108.       TabIndex        =   9
  109.       Top             =   120
  110.       Width           =   3336
  111.    End
  112.    Begin Label Label6 
  113.       BackColor       =   &H00C0C0C0&
  114.       Caption         =   "Compression method:"
  115.       FontBold        =   0   'False
  116.       FontItalic      =   0   'False
  117.       FontName        =   "MS Sans Serif"
  118.       FontSize        =   8.25
  119.       FontStrikethru  =   0   'False
  120.       FontUnderline   =   0   'False
  121.       Height          =   216
  122.       Left            =   96
  123.       TabIndex        =   5
  124.       Top             =   1404
  125.       Width           =   1668
  126.    End
  127.    Begin Label Label5 
  128.       BackColor       =   &H00C0C0C0&
  129.       Caption         =   "Last modification time:"
  130.       FontBold        =   0   'False
  131.       FontItalic      =   0   'False
  132.       FontName        =   "MS Sans Serif"
  133.       FontSize        =   8.25
  134.       FontStrikethru  =   0   'False
  135.       FontUnderline   =   0   'False
  136.       Height          =   216
  137.       Left            =   96
  138.       TabIndex        =   4
  139.       Top             =   1152
  140.       Width           =   1656
  141.    End
  142.    Begin Label Label4 
  143.       BackColor       =   &H00C0C0C0&
  144.       Caption         =   "Last modification date:"
  145.       FontBold        =   0   'False
  146.       FontItalic      =   0   'False
  147.       FontName        =   "MS Sans Serif"
  148.       FontSize        =   8.25
  149.       FontStrikethru  =   0   'False
  150.       FontUnderline   =   0   'False
  151.       Height          =   216
  152.       Left            =   96
  153.       TabIndex        =   3
  154.       Top             =   888
  155.       Width           =   1680
  156.    End
  157.    Begin Label Label3 
  158.       BackColor       =   &H00C0C0C0&
  159.       Caption         =   "Compression rate:"
  160.       FontBold        =   0   'False
  161.       FontItalic      =   0   'False
  162.       FontName        =   "MS Sans Serif"
  163.       FontSize        =   8.25
  164.       FontStrikethru  =   0   'False
  165.       FontUnderline   =   0   'False
  166.       Height          =   216
  167.       Left            =   96
  168.       TabIndex        =   2
  169.       Top             =   636
  170.       Width           =   1500
  171.    End
  172.    Begin Label Label2 
  173.       BackColor       =   &H00C0C0C0&
  174.       Caption         =   "Original size:"
  175.       FontBold        =   0   'False
  176.       FontItalic      =   0   'False
  177.       FontName        =   "MS Sans Serif"
  178.       FontSize        =   8.25
  179.       FontStrikethru  =   0   'False
  180.       FontUnderline   =   0   'False
  181.       Height          =   216
  182.       Left            =   96
  183.       TabIndex        =   1
  184.       Top             =   384
  185.       Width           =   1188
  186.    End
  187.    Begin Label Label1 
  188.       BackColor       =   &H00C0C0C0&
  189.       Caption         =   "File name:"
  190.       FontBold        =   0   'False
  191.       FontItalic      =   0   'False
  192.       FontName        =   "MS Sans Serif"
  193.       FontSize        =   8.25
  194.       FontStrikethru  =   0   'False
  195.       FontUnderline   =   0   'False
  196.       Height          =   216
  197.       Left            =   96
  198.       TabIndex        =   0
  199.       Top             =   132
  200.       Width           =   1176
  201.    End
  202. End
  203.  
  204. Sub Command1_Click ()
  205. Unload form2
  206. End Sub
  207.  
  208. Sub Form_Load ()
  209. Dim StrInfos As String
  210. Dim StrLabel As String
  211. 'You can use 3 different methods to retrieve a Zip file infos:
  212. 'Form1.VBZip1.GetFileInfos = Left$(Form1.VBFList1.ListString(CurrentIndex), InStr(1, Form1.VBFList1.ListString(CurrentIndex), ";") - 1)
  213. 'StrInfos$ = Form1.VBZip1.FileInfos
  214. '
  215. 'Or (this method is not as fast as the next one):
  216. 'StrInfos$ = Form1.VBZip1.ZFileFullInfos(CurrentIndex)
  217. '
  218. 'StrBack$ = StrInfos$
  219. 'szTestChar$ = ";"
  220. 'a% = InStr(1, StrInfos$, szTestChar$)
  221. 'StrLabel$ = Left$(StrInfos$, a% - 1)
  222. 'FileName.Caption = StrLabel$
  223. '
  224. 'StrInfos$ = Mid$(StrBack$, a% + 1, InStr(a% + 1, StrBack$, ";") - (a% + 1))
  225. 'FileSize.Caption = StrInfos$
  226. 'a% = InStr(a% + 1, StrBack$, szTestChar$)
  227. 'StrInfos$ = Mid$(StrBack$, a% + 1, InStr(a% + 1, StrBack$, ";") - (a% + 1))
  228. 'FileCompSize.Caption = StrInfos$
  229. 'a% = InStr(a% + 1, StrBack$, szTestChar$)
  230. 'StrInfos$ = Mid$(StrBack$, a% + 1, InStr(a% + 1, StrBack$, ";") - (a% + 1))
  231. 'FileDate.Caption = StrInfos$
  232. 'a% = InStr(a% + 1, StrBack$, szTestChar$)
  233. 'StrInfos$ = Mid$(StrBack$, a% + 1, InStr(a% + 1, StrBack$, ";") - (a% + 1))
  234. 'FileTime.Caption = StrInfos$
  235. 'a% = InStr(a% + 1, StrBack$, szTestChar$)
  236. 'StrInfos$ = Mid$(StrBack$, a% + 1, 1)
  237. 'StrLabel$ = StrInfos$
  238. 'If StrLabel$ = "0" Then
  239. '   FileMethod.Caption = "0 - Stored"
  240. 'ElseIf (StrLabel$ = "1") Then
  241. '      FileMethod.Caption = "1 - Shrunk"
  242. 'ElseIf (StrLabel$ = "2") Or (StrLabel$ = "3") Or (StrLabel$ = "4") Or (StrLabel$ = "5") Then
  243. '          FileMethod.Caption = "2,3,4,5 - Reduce"
  244. 'ElseIf (StrLabel$ = "6") Then
  245. '          FileMethod.Caption = "6 - Implode"
  246. 'ElseIf (StrLabel$ = "7") Then
  247. '          FileMethod.Caption = "7 - Token"
  248. 'ElseIf (StrLabel$ = "8") Then
  249. '          FileMethod.Caption = "8 - Deflate"
  250. 'ElseIf (StrLabel$ = "9") Then
  251. '          FileMethod.Caption = "9 - Unknown (not available)"
  252. 'ElseIf (StrLabel$ = "10") Then
  253. '          FileMethod.Caption = "10 - Error in the Zip file"
  254. 'End If
  255.  
  256.  
  257. 'This new method use the ZipList infos
  258. Form1.VBZip1.ZListIndex = CurrentIndex
  259. StrBack$ = StrInfos$
  260. szTestChar$ = ";"
  261. FileName.Caption = Form1.VBZip1.ZListDir + Form1.VBZip1.ZListName
  262. FileSize.Caption = Str$(Form1.VBZip1.ZListOriginalSize) + " b."
  263. FileCompSize.Caption = Str$(Form1.VBZip1.ZListRate) + " %"
  264. FileDate.Caption = Str$(Form1.VBZip1.ZListMonth) + "/" + Str$(Form1.VBZip1.ZListDay) + "/" + Str$(Form1.VBZip1.ZListYear)
  265. FileTime.Caption = Str$(Form1.VBZip1.ZListHour) + ":" + Str$(Form1.VBZip1.ZListMin)
  266. StrLabel$ = Str$(Form1.VBZip1.ZListMethod)
  267. StrLabel$ = Trim$(StrLabel$)
  268. If StrLabel$ = "0" Then
  269.    FileMethod.Caption = "0 - Stored"
  270. ElseIf (StrLabel$ = "1") Then
  271.       FileMethod.Caption = "1 - Shrunk"
  272. ElseIf (StrLabel$ = "2") Or (StrLabel$ = "3") Or (StrLabel$ = "4") Or (StrLabel$ = "5") Then
  273.           FileMethod.Caption = "2,3,4,5 - Reduce"
  274. ElseIf (StrLabel$ = "6") Then
  275.           FileMethod.Caption = "6 - Implode"
  276. ElseIf (StrLabel$ = "7") Then
  277.           FileMethod.Caption = "7 - Token"
  278. ElseIf (StrLabel$ = "8") Then
  279.           FileMethod.Caption = "8 - Deflate"
  280. ElseIf (StrLabel$ = "9") Then
  281.           FileMethod.Caption = "9 - Unknown (not available)"
  282. ElseIf (StrLabel$ = "10") Then
  283.           FileMethod.Caption = "10 - Error in the Zip file"
  284. End If
  285.  
  286. End Sub
  287.  
  288.